package com.fis.test3.Repository;

import com.fis.test3.model.BindingData;
import com.fis.test3.model.FiberPerpare;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BDataRepository extends JpaRepository<BindingData,Long> {

    @Query("select B from BindingData B where B.productNum like concat('%',:contractId,'%') ")
    List<BindingData>  findProductNameLike(@Param("contractId") String contractId);

    boolean existsByICname(String ICname);
    //

    BindingData getByICname(String iCname);
    BindingData getByProductNum(String ProductNum);

}
